package com.cloud.poetry.queue.producer;

import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author mengxj
 */
@Component
public class KafkaProducer {

    @Resource
    private KafkaTemplate<String, String> kafkaTemplate;

    public void push(String topic, String obj){
        this.kafkaTemplate.send(topic, obj);
    }
}
